<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<head lang="zh-CN">
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="Access-Control-Allow-Origin" content="localhost:8080"/>
    <title>请假申请列表</title>
</head>
 <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" rel="stylesheet"/>
 <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
 <link href="/lib/layer/theme/default/layer.css" rel="stylesheet"/>
 
 <script src="https://cdn.bootcss.com/jquery/3.2.0/jquery.min.js"></script>
 <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
 <script src="/lib/layer/layer.js"></script>
 <script src="/js/common.js"></script>
 <style>
 	table{
 		border:1px solid #000
 	}
 	table th{
 		border:1px solid #000;
 		background:gray;
 		color:white;
 	}
 	table td{
 		border:1px solid #000
 	}
 </style>
<body>
<div class="container">
	<div >当前登录者：<span>${user.firstName}</span>----<span>${group.name}</span></div>
	<div class="col-md-4 col-md-offset-10">
		<button type="button" class="btn btn-default text-right" onclick="add()">填写请假申请单</button>
	</div>
	<table class="table table-bordered">
		<tr>
			<th>请假人</th>
			<th>流程id</th>
			<th>请假原因</th>
			<th>请假类型</th>
			<th>开始时间</th>
			<th>结束时间</th>
		</tr>
		<tr th:each="vacation : ${list}">
            <td th:text="${vacation.userId}"></td>
	        <td th:text="${vacation.procInstId}"></td>
	        <td th:text="${vacation.reason}"></td>
	        <td th:text="${vacation.vacType}"></td>
	        <td th:text="${vacation.beginDate}"></td>
	        <td th:text="${vacation.endDate}"></td>
        </tr>
	</table>
	<!-- <div><p th:each="value:${list}"></p></div> -->
</div>
<script type="text/javascript">
	function add(){
		layer.open({
		      type: 2,
		      title: '添加用户',
		      shadeClose: true,
		      shade: [0],
		      maxmin: true, //开启最大化最小化按钮
		      area: ['600px', '600px'],
		      offset: '0px',
		      anim: 1,
		      content: ["/vacation/addVacation"]
		});
	}
</script>
</body>
</html>